<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>howbuy</title>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="psw_style.css">
<script>
	function checkInput() {
		var tradePwd = document.getElementById("tradePwd").value.trim();
		if(tradePwd == "") {
			alert("请输入交易密码！");
			document.getElementById("tradePwd").focus();
			return;
		}
		
		disabledSubmitBtn("a_submit", true, "onclick", "#fff", "checkInput();");
		//document.pwdForm.submit();
		window.demo.TradePostMethod(tradePwd);
	}
	
	function disabledSubmitBtn(id, isDisabled, operateAttribute, availColor, processMethod) {
		if(isDisabled) {
			document.getElementById(id).setAttribute(operateAttribute, "void(0);");
			document.getElementById(id).style.color = "gray";
		} else {
			document.getElementById(id).setAttribute(operateAttribute, processMethod);
			document.getElementById(id).style.color = availColor;
		}
	}
</script>
</head>
<body>
<div class="main">
	<form name="pwdForm" method="post" action="http://180.166.129.202:6080/howbuy-trade/trade/purchasesubmit.htm">
	    <input name="tradePwd" id="tradePwd" placeholder="交易密码" class="ui-input-text" type="password">
	    <div class="area_a"><a href="#" id="a_submit" onclick="checkInput();" class="btn_a">确认</a></div>
	</form>
</div>
<script>
</script>

</body></html>